<%@ page import="cn.java79.quiz.service.UserService" %>
<%@ page import="cn.java79.quiz.entity.User" %><%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2022/8/22
  Time: 17:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>新人注册</title>
</head>
<body>

<%@include file="/checkLogin.jsp"%>
<h1>欢迎来到虎课系统</h1>

  <form method="post" action="doUpdateUser.jsp">
      <fieldset>
          <legend>用户修改</legend>
          <p>
              <label>编号</label><input type="number" name="id" value="<%=user.getId()%>" readonly />
          </p>
          <p>
              <label>登录名</label><input type="text" name="loginname" value="<%=user.getLoginname()%>" required maxlength="40" placeholder="只能由字母和数字组成" pattern="\w{2,40}"/>
          </p>
          <p>
              <label>姓名</label><input type="text" name="realname" value="<%=user.getRealname()%>" required placeholder="必须是汉字" pattern="[\u4e00-\u9fa5]{2,20}"/>
          </p>
          <p>
              <label>手机号</label><input type="tel" name="phone" value="<%=user.getPhone()%>" required placeholder="参考你的手机号" pattern="1\d{10}"/>
          </p>
          <p>
              <label>电子邮件</label><input type="email" name="email" value="<%=user.getEmail()%>"/>
          </p>
          <%--<p>
              <label>密码</label><input type="password" name="pass"  required placeholder="必须是6位以上" pattern="\S{6,30}" maxlength="200"/>
          </p>--%>
          <p>
              <label>积分</label><input type="number" name="score" value="<%=user.getScore()%>" readonly/>
          </p>
          <p><label>级别:</label><input type="text" readonly name="level" value="<%=user.getLevel()%>"/> </p>
          <p>
             <input type="submit" value="保存"/>
             <input type="reset" value="重来"/>
          </p>
      </fieldset>
  </form>
</body>
</html>
